<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
	.KEYW {color: #933;}
	.COMM {color: #bbb; font-style: italic;}
	.NUMB {color: #393;}
	.STRN {color: #393;}
	.REGX {color: #339;}
	.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
	</style></head><body><pre><span class='line'>  1</span> <span class="COMM">/**
<span class='line'>  2</span>  * @author &lt;a href="http://www.creynders.be">Camille Reynders&lt;/a>
<span class='line'>  3</span>  * @version 0.2.0
<span class='line'>  4</span>  * @namespace
<span class='line'>  5</span>  */</span><span class="WHIT">
<span class='line'>  6</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">dijon</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>  7</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>  8</span> 	 * framework version number
<span class='line'>  9</span> 	 * @constant
<span class='line'> 10</span> 	 * @type String
<span class='line'> 11</span> 	 */</span><span class="WHIT">
<span class='line'> 12</span> </span><span class="WHIT">	</span><span class="NAME">VERSION</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'0.3.2'</span><span class="WHIT">
<span class='line'> 13</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="COMM">//dijon</span><span class="WHIT">
<span class='line'> 14</span> 
<span class='line'> 15</span> </span><span class="WHIT">  </span><span class="COMM">//======================================//</span><span class="WHIT">
<span class='line'> 16</span> </span><span class="WHIT"> </span><span class="COMM">// dijon.EventDispatcher</span><span class="WHIT">
<span class='line'> 17</span> </span><span class="COMM">//======================================//</span><span class="WHIT">
<span class='line'> 18</span> 
<span class='line'> 19</span> </span><span class="COMM">/**
<span class='line'> 20</span>  * @class dijon.EventDispatcher
<span class='line'> 21</span>  * @author Camille Reynders - www.creynders.be
<span class='line'> 22</span>  * @constructor
<span class='line'> 23</span>  */</span><span class="WHIT">
<span class='line'> 24</span> </span><span class="NAME">dijon.EventDispatcher</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 25</span> 
<span class='line'> 26</span> </span><span class="WHIT">	</span><span class="NAME">this.fqn</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'dijon.EventDispatcher'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 27</span> 
<span class='line'> 28</span> </span><span class="WHIT">	</span><span class="COMM">/** @private */</span><span class="WHIT">
<span class='line'> 29</span> </span><span class="WHIT">	</span><span class="NAME">this._listeners</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 30</span> 
<span class='line'> 31</span> </span><span class="WHIT">	</span><span class="COMM">/** @private */</span><span class="WHIT">
<span class='line'> 32</span> </span><span class="WHIT">	</span><span class="NAME">this._length</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 33</span> 
<span class='line'> 34</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="COMM">//dijon.EventDispatcher</span><span class="WHIT">
<span class='line'> 35</span> 
<span class='line'> 36</span> </span><span class="NAME">dijon.EventDispatcher.prototype</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 37</span> 
<span class='line'> 38</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 39</span> 	 * @private
<span class='line'> 40</span> 	 * @param {String} eventType
<span class='line'> 41</span> 	 * @param {Number} index
<span class='line'> 42</span> 	 */</span><span class="WHIT">
<span class='line'> 43</span> </span><span class="WHIT">	</span><span class="NAME">_removeListenerByIndex</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">eventType</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">index</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 44</span> </span><span class="WHIT">		</span><span class="NAME">this._listeners</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">eventType</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">splice</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">index</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 45</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this._listeners</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">eventType</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">length</span><span class="WHIT"> </span><span class="PUNC">&lt;=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'> 46</span> </span><span class="WHIT">			</span><span class="KEYW">delete</span><span class="WHIT"> </span><span class="NAME">this._listeners</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">eventType</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 47</span> </span><span class="WHIT">		</span><span class="NAME">this._length</span><span class="PUNC">--</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 48</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 49</span> 
<span class='line'> 50</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 51</span> 	 * adds a handler to be invoked when an event is dispatched
<span class='line'> 52</span> 	 * @param {String} eventType The name of the event to be listened to
<span class='line'> 53</span> 	 * @param {Function} listener The handler to be called when the event has been dispatched
<span class='line'> 54</span> 	 * @param {Boolean} [oneShot=false] Whether the listener must be called only once
<span class='line'> 55</span> 	 * @param {Boolean} [passEvent=false] Whether the event object needs to be passed to the listener
<span class='line'> 56</span> 	 * @return {dijon.EventDispatcher} The EventDispatcher instance
<span class='line'> 57</span> 	*/</span><span class="WHIT">
<span class='line'> 58</span> </span><span class="WHIT">	</span><span class="NAME">addListener</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">eventType</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">listener</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">oneShot</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">passEvent</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 59</span> </span><span class="WHIT">		</span><span class="NAME">this.addScopedListener</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">eventType</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">listener</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">oneShot</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">passEvent</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 60</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 61</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 62</span> 
<span class='line'> 63</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 64</span> 	 * adds a handler to be invoked in a specific &lt;code>scope&lt;/code> when an event of &lt;code>eventType&lt;/code> is dispatched
<span class='line'> 65</span> 	 * @param {String} eventType The name of the event to be listened to
<span class='line'> 66</span> 	 * @param {Function} listener The handler to be called when the event has been dispatched
<span class='line'> 67</span> 	 * @param {Object} scope The scope in which the listener will be called
<span class='line'> 68</span> 	 * @param {Boolean} [oneShot=false] Whether the listener must be called only once
<span class='line'> 69</span> 	 * @param {Boolean} [passEvent=false] Whether the event object needs to be passed to the listener
<span class='line'> 70</span> 	 * @return {dijon.EventDispatcher} The EventDispatcher instance
<span class='line'> 71</span> 	 */</span><span class="WHIT">
<span class='line'> 72</span> </span><span class="WHIT">	</span><span class="NAME">addScopedListener</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">eventType</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">listener</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">scope</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">oneShot</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">passEvent</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 73</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">oneShot</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">oneShot</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 74</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">passEvent</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">passEvent</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 75</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this._listeners</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">eventType</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 76</span> </span><span class="WHIT">			</span><span class="NAME">this._listeners</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">eventType</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 77</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 78</span> </span><span class="WHIT">		</span><span class="NAME">this._listeners</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">eventType</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 79</span> </span><span class="WHIT">			</span><span class="NAME">scope</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">scope</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 80</span> </span><span class="WHIT">			</span><span class="NAME">listener</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">listener</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 81</span> </span><span class="WHIT">			</span><span class="NAME">oneShot</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">oneShot</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 82</span> </span><span class="WHIT">			</span><span class="NAME">passEvent</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">passEvent</span><span class="WHIT">
<span class='line'> 83</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 84</span> </span><span class="WHIT">		</span><span class="PUNC">++</span><span class="NAME">this._length</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 85</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 86</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 87</span> 
<span class='line'> 88</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 89</span> 	 * Checks whether the dispatcher object has registered &lt;code>listener&lt;/code> for &lt;code>eventType&lt;/code>
<span class='line'> 90</span> 	 * @param {String} eventType The name of the event to be listened to
<span class='line'> 91</span> 	 * @param {Function} listener The handler to be called when the event has been dispatched
<span class='line'> 92</span> 	 * @return {Boolean}
<span class='line'> 93</span> 	 */</span><span class="WHIT">
<span class='line'> 94</span> </span><span class="WHIT">	</span><span class="NAME">hasListener</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">eventType</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">listener</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 95</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.hasScopedListener</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">eventType</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">listener</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 96</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 97</span> 
<span class='line'> 98</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 99</span> 	 * Checks whether the dispatcher object has registered &lt;code>listener&lt;/code> in &lt;code>scope&lt;/code> for &lt;code>eventType&lt;/code>
<span class='line'>100</span> 	 * @param {String} eventType The name of the event to be listened to
<span class='line'>101</span> 	 * @param {Function} listener The handler to be called when the event has been dispatched
<span class='line'>102</span> 	 * @param {Object} scope The scope in which the listener will be called
<span class='line'>103</span> 	 * @return {Boolean}
<span class='line'>104</span> 	 */</span><span class="WHIT">
<span class='line'>105</span> </span><span class="WHIT">	</span><span class="NAME">hasScopedListener</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">eventType</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">listener</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">scope</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>106</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this._listeners</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">eventType</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>107</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">listeners</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._listeners</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">eventType</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>108</span> </span><span class="WHIT">			</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">n</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">listeners.length</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">n</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="WHIT">  </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>109</span> </span><span class="WHIT">				</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">listeners</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>110</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">obj.listener</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">listener</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">obj.scope</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">scope</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>111</span> </span><span class="WHIT">					</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>112</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>113</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>114</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>115</span> 
<span class='line'>116</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>117</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>118</span> 
<span class='line'>119</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>120</span> 	 * Removes a &lt;code>listener&lt;/code> registered for &lt;code>eventType&lt;/code>
<span class='line'>121</span> 	 * @param {String} eventType The name of the event to be listened to
<span class='line'>122</span> 	 * @param {Function} listener The handler to be called when the event has been dispatched
<span class='line'>123</span> 	 * @return {dijon.EventDispatcher} The EventDispatcher instance
<span class='line'>124</span> 	 */</span><span class="WHIT">
<span class='line'>125</span> </span><span class="WHIT">	</span><span class="NAME">removeListener</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">eventType</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">listener</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>126</span> </span><span class="WHIT">		</span><span class="NAME">this.removeScopedListener</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">eventType</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">listener</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>127</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>128</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>129</span> 
<span class='line'>130</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>131</span> 	 * Removes a &lt;code>listener&lt;/code> in &lt;code>scope&lt;/code> registered for &lt;code>eventType&lt;/code>
<span class='line'>132</span> 	 * @param {String} eventType The name of the event to be listened to
<span class='line'>133</span> 	 * @param {Function} listener The handler to be called when the event has been dispatched
<span class='line'>134</span> 	 * @param {Object} scope The scope in which the listener will be called
<span class='line'>135</span> 	 * @return {dijon.EventDispatcher} The EventDispatcher instance
<span class='line'>136</span> 	 */</span><span class="WHIT">
<span class='line'>137</span> </span><span class="WHIT">	</span><span class="NAME">removeScopedListener</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">eventType</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">listener</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">scope</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>138</span> </span><span class="WHIT">		</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">this._listeners</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">eventType</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">this._listeners</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">eventType</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">length</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT">  </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>139</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._listeners</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">eventType</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>140</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">obj.listener</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">listener</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">obj.scope</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">scope</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>141</span> </span><span class="WHIT">				</span><span class="NAME">this._removeListenerByIndex</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">eventType</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>142</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>143</span> </span><span class="WHIT">				</span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>144</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>145</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>146</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>147</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>148</span> 
<span class='line'>149</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>150</span> 	 * dispatches an event with any number of arguments
<span class='line'>151</span> 	 * @param {Object|String} event The event object or event type
<span class='line'>152</span> 	 * @param {String} event.type if &lt;code>event&lt;/code> is of type &lt;code>Object&lt;/code> it requires a &lt;code>type&lt;/code> property set to the name of the event that will be listened to.
<span class='line'>153</span> 	 * @param {...} [...=undefined] Any number of parameters
<span class='line'>154</span> 	 * @return {dijon.EventDispatcher} The EventDispatcher instance
<span class='line'>155</span> 	 */</span><span class="WHIT">
<span class='line'>156</span> </span><span class="WHIT">	</span><span class="NAME">dispatchEvent</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">event</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>157</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">event</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"string"</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>158</span> </span><span class="WHIT">			</span><span class="NAME">event</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">type</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">event</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>159</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>160</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">event.target</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>161</span> </span><span class="WHIT">			</span><span class="NAME">event.target</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>162</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>163</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">args</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>164</span> </span><span class="WHIT">		</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">n</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">arguments.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">n</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>165</span> </span><span class="WHIT">			</span><span class="NAME">args.push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>166</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>167</span> 
<span class='line'>168</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this._listeners</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">event.type</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>169</span> </span><span class="WHIT">			</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">this._listeners</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">event.type</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">this._listeners</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">event.type</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">length</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT">  </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>170</span> </span><span class="WHIT">				</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._listeners</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">event.type</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>171</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">obj.oneShot</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>172</span> </span><span class="WHIT">					</span><span class="NAME">this._removeListenerByIndex</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">event.type</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>173</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>174</span> </span><span class="WHIT">					</span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>175</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>176</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">obj.passEvent</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>177</span> </span><span class="WHIT">					</span><span class="NAME">args.unshift</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">event</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>178</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>179</span> </span><span class="WHIT">				</span><span class="NAME">obj.listener.apply</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">obj.scope</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">args</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>180</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>181</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>182</span> 
<span class='line'>183</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>184</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>185</span> 
<span class='line'>186</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>187</span> 	 * removes all event listeners
<span class='line'>188</span> 	 * @return {dijon.EventDispatcher} The EventDispatcher instance
<span class='line'>189</span> 	 */</span><span class="WHIT">
<span class='line'>190</span> </span><span class="WHIT">	</span><span class="NAME">removeAllListeners</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>191</span> </span><span class="WHIT">	   </span><span class="NAME">this._listeners</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>192</span> </span><span class="WHIT">	   </span><span class="NAME">this._length</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>193</span> 
<span class='line'>194</span> </span><span class="WHIT">	   </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>195</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>196</span> 
<span class='line'>197</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>198</span> 	 * Returns the number of listeners
<span class='line'>199</span> 	 * @return {Number} The number of listeners
<span class='line'>200</span> 	 */</span><span class="WHIT">
<span class='line'>201</span> </span><span class="WHIT">	</span><span class="NAME">length</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>202</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this._length</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>203</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>204</span> 
<span class='line'>205</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="COMM">//dijon.EventDispatcher.prototype</span><span class="WHIT">
<span class='line'>206</span> 
<span class='line'>207</span> </span><span class="WHIT">  </span><span class="COMM">//======================================//</span><span class="WHIT">
<span class='line'>208</span> </span><span class="WHIT"> </span><span class="COMM">// dijon.Dictionary</span><span class="WHIT">
<span class='line'>209</span> </span><span class="COMM">//======================================//</span><span class="WHIT">
<span class='line'>210</span> 
<span class='line'>211</span> </span><span class="COMM">/**
<span class='line'>212</span>  * The Dictionary class lets you create a dynamic collection of properties, which uses strict equality (===) for key comparison.
<span class='line'>213</span>  * @class dijon.Dictionary
<span class='line'>214</span>  * @constructor
<span class='line'>215</span>  */</span><span class="WHIT">
<span class='line'>216</span> </span><span class="NAME">dijon.Dictionary</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>217</span> 
<span class='line'>218</span> </span><span class="WHIT">	</span><span class="NAME">this.fqn</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'dijon.Dictionary'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>219</span> </span><span class="WHIT">	
<span class='line'>220</span> 	</span><span class="COMM">/**
<span class='line'>221</span> 	 * @private
<span class='line'>222</span> 	 */</span><span class="WHIT">
<span class='line'>223</span> </span><span class="WHIT">	</span><span class="NAME">this._map</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>224</span> </span><span class="WHIT">	
<span class='line'>225</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="COMM">//dijon.Dictionary</span><span class="WHIT">
<span class='line'>226</span> 
<span class='line'>227</span> </span><span class="NAME">dijon.Dictionary.prototype</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>228</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>229</span> 	 * @private
<span class='line'>230</span> 	 * @param key
<span class='line'>231</span> 	 * @return index
<span class='line'>232</span> 	 */</span><span class="WHIT">
<span class='line'>233</span> </span><span class="WHIT">	</span><span class="NAME">_getIndexByKey</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">key</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>234</span> </span><span class="WHIT">		</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">n</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._map.length</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">n</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>235</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this._map</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">key</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">key</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>236</span> </span><span class="WHIT">                </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>237</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>238</span> 
<span class='line'>239</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>240</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>241</span> 
<span class='line'>242</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>243</span> 	 * Maps &lt;code>value&lt;/code> to &lt;code>key&lt;/code>
<span class='line'>244</span> 	 * @param {Object} key
<span class='line'>245</span> 	 * @param {Object} value
<span class='line'>246</span> 	 * @return {dijon.Dictionary} the Dictionary instance
<span class='line'>247</span> 	 */</span><span class="WHIT">
<span class='line'>248</span> </span><span class="WHIT">	</span><span class="NAME">add</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">key</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>249</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">index</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._getIndexByKey</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">key</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>250</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">index</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>251</span> </span><span class="WHIT">			</span><span class="NAME">this._map.push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>252</span> </span><span class="WHIT">				</span><span class="NAME">key</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">key</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>253</span> </span><span class="WHIT">				</span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">value</span><span class="WHIT">
<span class='line'>254</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>255</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>256</span> </span><span class="WHIT">			</span><span class="NAME">this._map</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">index</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>257</span> </span><span class="WHIT">				</span><span class="NAME">key</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">key</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>258</span> </span><span class="WHIT">				</span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">value</span><span class="WHIT">
<span class='line'>259</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>260</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>261</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>262</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>263</span> 
<span class='line'>264</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>265</span> 	 * removes the mapping of the value of &lt;code>key&lt;/code>
<span class='line'>266</span> 	 * @param {Object} key
<span class='line'>267</span> 	 * @return {dijon.Dictionary} the Dictionary instance
<span class='line'>268</span> 	 */</span><span class="WHIT">
<span class='line'>269</span> </span><span class="WHIT">	</span><span class="NAME">remove</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">key</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>270</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">index</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._getIndexByKey</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">key</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>271</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">index</span><span class="WHIT"> </span><span class="PUNC">>=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this._map.splice</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">index</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">value</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>272</span> 
<span class='line'>273</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>274</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>275</span> 
<span class='line'>276</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>277</span> 	 * retrieves the value mapped to &lt;code>key&lt;/code>
<span class='line'>278</span> 	 * @param {Object} key
<span class='line'>279</span> 	 * @return {Object} the value mapped to &lt;code>key&lt;/code>
<span class='line'>280</span> 	 */</span><span class="WHIT">
<span class='line'>281</span> </span><span class="WHIT">	</span><span class="NAME">getValue</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">key</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>282</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">index</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._getIndexByKey</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">key</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>283</span> 
<span class='line'>284</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">index</span><span class="WHIT"> </span><span class="PUNC">>=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this._map</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">index</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">value</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>285</span> 
<span class='line'>286</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>287</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>288</span> 
<span class='line'>289</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>290</span> 	 * checks whether a value has been mapped to &lt;code>key&lt;/code>
<span class='line'>291</span> 	 * @param {Object} key
<span class='line'>292</span> 	 * @return {Boolean}
<span class='line'>293</span> 	 */</span><span class="WHIT">
<span class='line'>294</span> </span><span class="WHIT">	</span><span class="NAME">hasValue</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">key</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>295</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">index</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._getIndexByKey</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">key</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>296</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">index</span><span class="WHIT"> </span><span class="PUNC">>=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>297</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>298</span> 
<span class='line'>299</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="COMM">//dijon.Dictionary.prototype</span><span class="WHIT">
<span class='line'>300</span> 
<span class='line'>301</span> </span><span class="WHIT">  </span><span class="COMM">//======================================//</span><span class="WHIT">
<span class='line'>302</span> </span><span class="WHIT"> </span><span class="COMM">// dijon.Injector</span><span class="WHIT">
<span class='line'>303</span> </span><span class="COMM">//======================================//</span><span class="WHIT">
<span class='line'>304</span> 
<span class='line'>305</span> </span><span class="COMM">/**
<span class='line'>306</span>  * @class dijon.Injector
<span class='line'>307</span>  * @constructor
<span class='line'>308</span> */</span><span class="WHIT">
<span class='line'>309</span> </span><span class="NAME">dijon.Injector</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>310</span> </span><span class="WHIT">	</span><span class="NAME">this.fqn</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'dijon.Injector'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>311</span> 
<span class='line'>312</span> </span><span class="WHIT">	</span><span class="COMM">/** @private */</span><span class="WHIT">
<span class='line'>313</span> </span><span class="WHIT">	</span><span class="NAME">this._mappingsByClassOrObject</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">dijon.Dictionary</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>314</span> 
<span class='line'>315</span> </span><span class="WHIT">	</span><span class="COMM">/** @private */</span><span class="WHIT">
<span class='line'>316</span> </span><span class="WHIT">	</span><span class="NAME">this._outlets</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>317</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="COMM">//dijon.Injector</span><span class="WHIT">
<span class='line'>318</span> 
<span class='line'>319</span> </span><span class="NAME">dijon.Injector.prototype</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>320</span> 
<span class='line'>321</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>322</span> 	 * @private
<span class='line'>323</span> 	 * @param {Class} clazz
<span class='line'>324</span> 	 */</span><span class="WHIT">
<span class='line'>325</span> </span><span class="WHIT">	</span><span class="NAME">_createAndSetupInstance</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">clazz</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>326</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">instance</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">clazz</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>327</span> </span><span class="WHIT">		</span><span class="NAME">this.injectInto</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">instance</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>328</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">"setup"</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">instance</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">instance.setup.call</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">instance</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>329</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">instance</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>330</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>331</span> 
<span class='line'>332</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>333</span> 	 * @private
<span class='line'>334</span> 	 * @param {Class} key
<span class='line'>335</span> 	 * @param {Boolean} overrideRules
<span class='line'>336</span> 	 * @return {Object}
<span class='line'>337</span> 	 */</span><span class="WHIT">
<span class='line'>338</span> </span><span class="WHIT">	</span><span class="NAME">_retrieveFromCacheOrCreate</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">key</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">overrideRules</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>339</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">config</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._mappingsByClassOrObject.getValue</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">key</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>340</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">output</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>341</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">overrideRules</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>342</span> </span><span class="WHIT">            </span><span class="COMM">//key is a class</span><span class="WHIT">
<span class='line'>343</span> </span><span class="WHIT">            </span><span class="COMM">//TODO: check if it IS a class</span><span class="WHIT">
<span class='line'>344</span> </span><span class="WHIT">			</span><span class="NAME">output</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._createAndSetupInstance</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">key</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>345</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>346</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">config</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>347</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">config.isSingleton</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>348</span> </span><span class="WHIT">					</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">config.object</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT">  </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>349</span> </span><span class="WHIT">						</span><span class="NAME">config.object</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._createAndSetupInstance</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">config.clazz</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>350</span> </span><span class="WHIT">					</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>351</span> </span><span class="WHIT">					</span><span class="NAME">output</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">config.object</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>352</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>353</span> </span><span class="WHIT">					</span><span class="NAME">output</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._createAndSetupInstance</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">config.clazz</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>354</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>355</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>356</span> </span><span class="WHIT">				</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.fqn</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">" is missing a rule for "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">key</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>357</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>358</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>359</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">output</span><span class="WHIT">
<span class='line'>360</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>361</span> 
<span class='line'>362</span> 
<span class='line'>363</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>364</span> 	 * defines &lt;code>propertyName&lt;/code> as an injection point for the class mapped to &lt;code>targetKey&lt;/code> to be injected with an instance
<span class='line'>365</span> 	 * of the class mapped to &lt;code>sourceKey&lt;/code>.
<span class='line'>366</span> 	 * @param {Class} targetKey the class the injection point is applied to.
<span class='line'>367</span> 	 * @param {String} propertyName the &lt;strong>name&lt;/strong> of the property used as an injection point.&lt;br/>
<span class='line'>368</span> 	 * [!] MUST BE STRING
<span class='line'>369</span> 	 * @param {Object} sourceKey the key to the value that will be injected
<span class='line'>370</span>      * @see dijon.Injector#removeOutlet
<span class='line'>371</span> 	 */</span><span class="WHIT">
<span class='line'>372</span> </span><span class="WHIT">	</span><span class="NAME">addOutlet</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">targetKey</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">propertyName</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">sourceKey</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>373</span> </span><span class="WHIT">		</span><span class="NAME">this._outlets.push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>374</span> </span><span class="WHIT">			</span><span class="NAME">target</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">targetKey</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>375</span> </span><span class="WHIT">			</span><span class="NAME">property</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">propertyName</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>376</span> </span><span class="WHIT">			</span><span class="NAME">source</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">sourceKey</span><span class="WHIT">
<span class='line'>377</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>378</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>379</span> 
<span class='line'>380</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>381</span> 	 * Create (if possible) or retrieve an instance of the class mapped to &lt;code>key&lt;/code>
<span class='line'>382</span> 	 * @param {Object} key
<span class='line'>383</span> 	 * @return {Object}
<span class='line'>384</span> 	 */</span><span class="WHIT">
<span class='line'>385</span> </span><span class="WHIT">	</span><span class="NAME">getInstance</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">key</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>386</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this._retrieveFromCacheOrCreate</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">key</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>387</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>388</span> 
<span class='line'>389</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>390</span> 	 * When asked for an instance of the class &lt;code>whenAskedFor&lt;code> or object &lt;code>whenAskedFor&lt;/code> inject an instance of &lt;code>whenAskedFor&lt;code>.
<span class='line'>391</span> 	 * @param {Class|Object} whenAskedFor
<span class='line'>392</span> 	 */</span><span class="WHIT">
<span class='line'>393</span> </span><span class="WHIT">	</span><span class="NAME">mapSingleton</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">whenAskedFor</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>394</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this._mappingsByClassOrObject.hasValue</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">whenAskedFor</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.fqn</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">' cannot remap '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">whenAskedFor</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">' without unmapping first'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>395</span> </span><span class="WHIT">		</span><span class="NAME">this.mapSingletonOf</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">whenAskedFor</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">whenAskedFor</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>396</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>397</span> 
<span class='line'>398</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>399</span> 	 * When asked for an instance of the class &lt;code>whenAskedFor&lt;/code> or object &lt;code>whenAskedFor&lt;/code> inject the instance &lt;code>useValue&lt;/code>.
<span class='line'>400</span> 	 * @param {Class|Object} whenAskedFor
<span class='line'>401</span> 	 * @param {Object} useValue
<span class='line'>402</span> 	 */</span><span class="WHIT">
<span class='line'>403</span> </span><span class="WHIT">	</span><span class="NAME">mapValue</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">whenAskedFor</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">useValue</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>404</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">whenAskedFor</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">whenAskedFor</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.fqn</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">' cannot map to an undefined object'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>405</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">useValue</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">useValue</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.fqn</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">' cannot map an undefined object'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>406</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this._mappingsByClassOrObject.hasValue</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">whenAskedFor</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.fqn</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">' cannot remap '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">' without unmapping first'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>407</span> </span><span class="WHIT">		</span><span class="NAME">this._mappingsByClassOrObject.add</span><span class="PUNC">(</span><span class="WHIT">
<span class='line'>408</span> </span><span class="WHIT">			</span><span class="NAME">whenAskedFor</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>409</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>410</span> </span><span class="WHIT">				</span><span class="NAME">clazz</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">whenAskedFor</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>411</span> </span><span class="WHIT">				</span><span class="NAME">object</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">useValue</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>412</span> </span><span class="WHIT">				</span><span class="NAME">isSingleton</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="WHIT">
<span class='line'>413</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>414</span> </span><span class="WHIT">		</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>415</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>416</span> 
<span class='line'>417</span> </span><span class="WHIT">	</span><span class="NAME">setValue</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">whenAskedFor</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">useValue</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>418</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">config</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._mappingsByClassOrObject.getValue</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">whenAskedFor</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>419</span> </span><span class="WHIT">		</span><span class="NAME">config.object</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">useValue</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>420</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>421</span> 
<span class='line'>422</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>423</span> 	 * Does a rule exist to satsify such a request?
<span class='line'>424</span> 	 * @param {Class} whenAskedFor
<span class='line'>425</span> 	 * @return {Boolean}
<span class='line'>426</span> 	 */</span><span class="WHIT">
<span class='line'>427</span> </span><span class="WHIT">	</span><span class="NAME">hasMapping</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">whenAskedFor</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>428</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this._mappingsByClassOrObject.hasValue</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">whenAskedFor</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>429</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>430</span> 
<span class='line'>431</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>432</span> 	 * When asked for an instance of the class &lt;code>whenAskedFor&lt;/code> or for object &lt;code>whenAskedFor&lt;/code> inject a &lt;strong>new&lt;/strong> instance of &lt;code>instantiateClass&lt;/code>.
<span class='line'>433</span> 	 * @param {Class|Object} whenAskedFor
<span class='line'>434</span> 	 * @param {Class} instantiateClass
<span class='line'>435</span> 	 */</span><span class="WHIT">
<span class='line'>436</span> </span><span class="WHIT">	</span><span class="NAME">mapClass</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">whenAskedFor</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">instantiateClass</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>437</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.hasMapping</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">whenAskedFor</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.fqn</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">' cannot remap '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">' without unmapping first'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>438</span> </span><span class="WHIT">		</span><span class="NAME">this._mappingsByClassOrObject.add</span><span class="PUNC">(</span><span class="WHIT">
<span class='line'>439</span> </span><span class="WHIT">			</span><span class="NAME">whenAskedFor</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>440</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>441</span> </span><span class="WHIT">				</span><span class="NAME">clazz</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">instantiateClass</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>442</span> </span><span class="WHIT">				</span><span class="NAME">object</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>443</span> </span><span class="WHIT">				</span><span class="NAME">isSingleton</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="WHIT">
<span class='line'>444</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>445</span> </span><span class="WHIT">		</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>446</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>447</span> 
<span class='line'>448</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>449</span> 	 * When asked for an instance of the class &lt;code>whenAskedFor&lt;/code> or object &lt;code>whenAskedFor&lt;/code> inject an instance of &lt;code>useSingletonOf&lt;/code>.
<span class='line'>450</span> 	 * @param {Class|Object} whenAskedFor
<span class='line'>451</span> 	 * @param {Class} useSingletonOf
<span class='line'>452</span> 	 */</span><span class="WHIT">
<span class='line'>453</span> </span><span class="WHIT">	</span><span class="NAME">mapSingletonOf</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">whenAskedFor</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">useSingletonOf</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>454</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this._mappingsByClassOrObject.hasValue</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">whenAskedFor</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.fqn</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">' cannot remap '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">' without unmapping first'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>455</span> </span><span class="WHIT">		</span><span class="NAME">this._mappingsByClassOrObject.add</span><span class="PUNC">(</span><span class="WHIT">
<span class='line'>456</span> </span><span class="WHIT">			</span><span class="NAME">whenAskedFor</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>457</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>458</span> </span><span class="WHIT">				</span><span class="NAME">clazz</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">useSingletonOf</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>459</span> </span><span class="WHIT">				</span><span class="NAME">object</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>460</span> </span><span class="WHIT">				</span><span class="NAME">isSingleton</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="WHIT">
<span class='line'>461</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>462</span> </span><span class="WHIT">		</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>463</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>464</span> 
<span class='line'>465</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>466</span> 	 * create an instance of the class mapped to &lt;code>keyOrClass&lt;/code> and fulfill it's mapped dependencies&lt;br/>
<span class='line'>467</span> 	 * &lt;strong>WILL ALWAYS CREATE A NEW INSTANCE&lt;/strong>, even if &lt;code>keyOrClass&lt;/code> was mapped otherwise or
<span class='line'>468</span> 	 * &lt;strong>even when &lt;code>keyOrClass&lt;/code> was not mapped&lt;/code>.
<span class='line'>469</span> 	 * @param {Class} keyOrClass
<span class='line'>470</span> 	 * @return {Object}
<span class='line'>471</span> 	 */</span><span class="WHIT">
<span class='line'>472</span> </span><span class="WHIT">	</span><span class="NAME">instantiate</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">keyOrClass</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>473</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this._retrieveFromCacheOrCreate</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">keyOrClass</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>474</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>475</span> 
<span class='line'>476</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>477</span> 	 * Perform an injection into an object, satisfying all it's dependencies
<span class='line'>478</span> 	 * @param {Object} instance
<span class='line'>479</span> 	 */</span><span class="WHIT">
<span class='line'>480</span> </span><span class="WHIT">	</span><span class="NAME">injectInto</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">instance</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>481</span> </span><span class="WHIT">		</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">n</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._outlets.length</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">n</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>482</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">mapping</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._outlets</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>483</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">instance</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">instance</span><span class="WHIT"> </span><span class="KEYW">instanceof</span><span class="WHIT"> </span><span class="NAME">mapping.target</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">mapping.property</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">instance</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>484</span> </span><span class="WHIT">				</span><span class="NAME">instance</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">mapping.property</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getInstance</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">mapping.source</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>485</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>486</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>487</span> 
<span class='line'>488</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>489</span> 	 * Remove a rule from the injector
<span class='line'>490</span> 	 * @param {Class|Object} whenAskedFor
<span class='line'>491</span> 	 */</span><span class="WHIT">
<span class='line'>492</span> </span><span class="WHIT">	</span><span class="NAME">unmap</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">whenAskedFor</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>493</span> </span><span class="WHIT">		</span><span class="NAME">this._mappingsByClassOrObject.remove</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">whenAskedFor</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>494</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>495</span> 
<span class='line'>496</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>497</span> 	 * removes an injection point mapping for a given class mapped to &lt;code>key&lt;/code>
<span class='line'>498</span> 	 * @param {Object} key
<span class='line'>499</span> 	 * @param {String} propertyName MUST BE STRING
<span class='line'>500</span> 	 * @see dijon.Injector#addOutlet
<span class='line'>501</span> 	 */</span><span class="WHIT">
<span class='line'>502</span> </span><span class="WHIT">	</span><span class="NAME">removeOutlet</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">key</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">propertyName</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>503</span> </span><span class="WHIT">		</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">n</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._outlets.length</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">n</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>504</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">point</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._outlets</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>505</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">point.target</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">key</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">point.property</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">propertyName</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>506</span> </span><span class="WHIT">				</span><span class="NAME">this._outlets.splice</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>507</span> </span><span class="WHIT">				</span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>508</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>509</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>510</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>511</span> 
<span class='line'>512</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="COMM">//dijon.Injector.prototype</span><span class="WHIT">
<span class='line'>513</span> 
<span class='line'>514</span> </span><span class="WHIT">  </span><span class="COMM">//======================================//</span><span class="WHIT">
<span class='line'>515</span> </span><span class="WHIT"> </span><span class="COMM">// dijon.EventMap</span><span class="WHIT">
<span class='line'>516</span> </span><span class="COMM">//======================================//</span><span class="WHIT">
<span class='line'>517</span> 
<span class='line'>518</span> </span><span class="COMM">/**
<span class='line'>519</span>  * registers class members as listeners for specific events, before (or after) instantiation.&lt;br/>
<span class='line'>520</span>  * Allows for mapping listeners to lazily instantiated objects.&lt;br/>
<span class='line'>521</span>  * [!] This class differs substantially from the RobotLegs EventMap both in use and functionality
<span class='line'>522</span>  * @class dijon.EventMap
<span class='line'>523</span>  * @constructor
<span class='line'>524</span>  */</span><span class="WHIT">
<span class='line'>525</span> </span><span class="NAME">dijon.EventMap</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>526</span> </span><span class="WHIT">	</span><span class="NAME">this.fqn</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'dijon.EventMap'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>527</span> 
<span class='line'>528</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>529</span> 	 * @private
<span class='line'>530</span> 	 * @type Object
<span class='line'>531</span> 	 */</span><span class="WHIT">
<span class='line'>532</span> </span><span class="WHIT">	</span><span class="NAME">this._mappingsByEventType</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>533</span> 
<span class='line'>534</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>535</span> 	 * @private
<span class='line'>536</span> 	 * @type Object
<span class='line'>537</span> 	 */</span><span class="WHIT">
<span class='line'>538</span> </span><span class="WHIT">	</span><span class="NAME">this._mappingsNumByKey</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>539</span> 
<span class='line'>540</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>541</span> 	 * @private
<span class='line'>542</span> 	 * @type dijon.EventDispatcher
<span class='line'>543</span> 	 */</span><span class="WHIT">
<span class='line'>544</span> </span><span class="WHIT">	</span><span class="NAME">this.eventDispatcher</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">//inject</span><span class="WHIT">
<span class='line'>545</span> 
<span class='line'>546</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>547</span> 	 * @private
<span class='line'>548</span> 	 * @type dijon.Injector
<span class='line'>549</span> 	 */</span><span class="WHIT">
<span class='line'>550</span> </span><span class="WHIT">	</span><span class="NAME">this.injector</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">//inject</span><span class="WHIT">
<span class='line'>551</span> 
<span class='line'>552</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="COMM">//dijon.EventMap</span><span class="WHIT">
<span class='line'>553</span> 
<span class='line'>554</span> </span><span class="NAME">dijon.EventMap.prototype</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>555</span> 
<span class='line'>556</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>557</span> 	 * @private
<span class='line'>558</span> 	 * @param eventType
<span class='line'>559</span> 	 * @param key
<span class='line'>560</span> 	 * @param handler
<span class='line'>561</span> 	 */</span><span class="WHIT">
<span class='line'>562</span> </span><span class="WHIT">	</span><span class="NAME">_getMappingIndex</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">mappingsListForEvent</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">key</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">handler</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>563</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">mappingsListForEvent</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>564</span> </span><span class="WHIT">			</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">n</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">mappingsListForEvent.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">n</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>565</span> </span><span class="WHIT">				</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">mapping</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">mappingsListForEvent</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>566</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">mapping.key</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">key</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">mapping.handler</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">handler</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>567</span> </span><span class="WHIT">					</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>568</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>569</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>570</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>571</span> 
<span class='line'>572</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>573</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>574</span> </span><span class="WHIT">				
<span class='line'>575</span> 	</span><span class="COMM">/**
<span class='line'>576</span> 	 * @private
<span class='line'>577</span> 	 * @param {Object} event
<span class='line'>578</span> 	 */</span><span class="WHIT">
<span class='line'>579</span> </span><span class="WHIT">	</span><span class="NAME">_handleRuledMappedEvent</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">event</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>580</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">mappingsListForEvent</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._mappingsByEventType</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">event.type</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>581</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">args</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>582</span> 
<span class='line'>583</span> </span><span class="WHIT">		</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">n</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">arguments.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">n</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>584</span> </span><span class="WHIT">			</span><span class="NAME">args.push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>585</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>586</span> </span><span class="WHIT">		</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">n</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">mappingsListForEvent.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">n</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>587</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">mappingsListForEvent</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>588</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.injector.hasMapping</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">obj.key</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>589</span> </span><span class="WHIT">				</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">instance</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.injector.getInstance</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">obj.key</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>590</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">obj.oneShot</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>591</span> </span><span class="WHIT">					</span><span class="NAME">this.removeRuledMapping</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">event.type</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">obj.key</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">obj.handler</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>592</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">obj.passEvent</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>593</span> </span><span class="WHIT">					</span><span class="NAME">args.unshift</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">event</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>594</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">obj.handler</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>595</span> </span><span class="WHIT">					</span><span class="NAME">instance</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">obj.handler</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">apply</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">instance</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">args</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>596</span> </span><span class="WHIT">					</span><span class="COMM">//obj.handler.apply( instance, args );</span><span class="WHIT">
<span class='line'>597</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>598</span> </span><span class="WHIT">				</span><span class="COMM">//injector mapping has been deleted, but</span><span class="WHIT">
<span class='line'>599</span> </span><span class="WHIT">				</span><span class="COMM">//eventMap mapping not</span><span class="WHIT">
<span class='line'>600</span> </span><span class="WHIT">				</span><span class="COMM">//TODO: remove or throw error?</span><span class="WHIT">
<span class='line'>601</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>602</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>603</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>604</span> 
<span class='line'>605</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>606</span> 	 * @private
<span class='line'>607</span> 	 * @param {String} eventType
<span class='line'>608</span> 	 * @param {Class} key
<span class='line'>609</span> 	 * @param {Function} handler
<span class='line'>610</span> 	 */</span><span class="WHIT">
<span class='line'>611</span> </span><span class="WHIT">	</span><span class="NAME">_removeRuledMappingAndUnmapFromInjectorIfNecessary</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">eventType</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">key</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">handler</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>612</span> </span><span class="WHIT">		</span><span class="NAME">this.removeRuledMapping</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">eventType</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">key</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">handler</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>613</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">mappingsNum</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._mappingsNumByKey</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">key</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>614</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">mappingsNum</span><span class="WHIT"> </span><span class="PUNC">&lt;=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>615</span> </span><span class="WHIT">			</span><span class="NAME">this.injector.unmap</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">key</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>616</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>617</span> 
<span class='line'>618</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>619</span> 	 * maps &lt;code>handler&lt;/code> as a listener for &lt;code>eventType&lt;/code> to be called as an instance member of the class mapped to &lt;code>key&lt;/code>
<span class='line'>620</span> 	 * instance. The instance will be created according to the rule defined for &lt;code>key&lt;/code> in injector.
<span class='line'>621</span> 	 * &lt;br/>[!] requires &lt;code>key&lt;/code> is already ruled by the injector
<span class='line'>622</span> 	 * @see dijon.Injector
<span class='line'>623</span> 	 * @param {String} eventType The name of the event to be listened to
<span class='line'>624</span> 	 * @param {Object} key
<span class='line'>625</span> 	 * @param {Function} handler
<span class='line'>626</span> 	 * @param {Boolean} [oneShot=false] Whether the listener must be called only once
<span class='line'>627</span> 	 * @param {Boolean} [passEvent=false] Whether the event object should be passed as a parameter to &lt;code>handler&lt;/code>
<span class='line'>628</span> 	 * upon invocation or not. If &lt;code>true&lt;/code> any additional dispatched values will be passed as parameters after
<span class='line'>629</span> 	 * the event object
<span class='line'>630</span> 	 */</span><span class="WHIT">
<span class='line'>631</span> </span><span class="WHIT">	</span><span class="NAME">addRuledMapping</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">eventType</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">key</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">handler</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">oneShot</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">passEvent</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>632</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="WHIT"> </span><span class="NAME">this.injector.hasMapping</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">key</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>633</span> </span><span class="WHIT">			</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'*** ERROR *** '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">this.fqn</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">' addRuledMapping can only be used on a key already mapped by the injector'</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>634</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>635</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="WHIT"> </span><span class="NAME">this._mappingsByEventType</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">eventType</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>636</span> </span><span class="WHIT">			</span><span class="NAME">this._mappingsByEventType</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">eventType</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>637</span> </span><span class="WHIT">			</span><span class="NAME">this.eventDispatcher.addScopedListener</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">eventType</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this._handleRuledMappedEvent</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>638</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>639</span> 
<span class='line'>640</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">mappingsNum</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._mappingsNumByKey</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">key</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>641</span> </span><span class="WHIT">		</span><span class="NAME">this._mappingsNumByKey</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">key</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">++</span><span class="NAME">mappingsNum</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>642</span> 
<span class='line'>643</span> </span><span class="WHIT">		</span><span class="NAME">this._mappingsByEventType</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">eventType</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">key</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">key</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">handler</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">handler</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">oneShot</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">oneShot</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">passEvent</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">passEvent</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>644</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>645</span> 
<span class='line'>646</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>647</span> 	 * Removes the mapping for &lt;code>key&lt;/code>
<span class='line'>648</span> 	 * @see dijon.EventMap#addRuledMapping
<span class='line'>649</span> 	 * @param {String} eventType The name of the event to be listened to
<span class='line'>650</span> 	 * @param {Class} key
<span class='line'>651</span> 	 * @param {Function} handler
<span class='line'>652</span> 	 */</span><span class="WHIT">
<span class='line'>653</span> </span><span class="WHIT">	</span><span class="NAME">removeRuledMapping</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">eventType</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">key</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">handler</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>654</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">mappingsListForEvent</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._mappingsByEventType</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">eventType</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>655</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">index</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._getMappingIndex</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">mappingsListForEvent</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">key</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">handler</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>656</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">index</span><span class="WHIT"> </span><span class="PUNC">>=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>657</span> </span><span class="WHIT">			</span><span class="COMM">/* DO NOT CLEAN UP MAPPING DEPENDENCIES, mapping maybe still in use */</span><span class="WHIT">
<span class='line'>658</span> </span><span class="WHIT">			</span><span class="COMM">/*
<span class='line'>659</span> 			var mapping = mappingsListForEvent[ index ];
<span class='line'>660</span> 			delete mapping.key;
<span class='line'>661</span> 			delete mapping.handler;
<span class='line'>662</span> 			mapping = null;
<span class='line'>663</span> 			*/</span><span class="WHIT">
<span class='line'>664</span> </span><span class="WHIT">			</span><span class="NAME">mappingsListForEvent.splice</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">index</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>665</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">mappingsListForEvent.length</span><span class="WHIT"> </span><span class="PUNC">&lt;=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>666</span> </span><span class="WHIT">				</span><span class="KEYW">delete</span><span class="WHIT"> </span><span class="NAME">mappingsListForEvent</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">eventType</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>667</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">mappingsNum</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._mappingsNumByKey</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">key</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>668</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">mappingsNum</span><span class="WHIT"> </span><span class="PUNC">&lt;=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>669</span> </span><span class="WHIT">				</span><span class="KEYW">delete</span><span class="WHIT"> </span><span class="NAME">this._mappingsNumByKey</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">key</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>670</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>671</span> </span><span class="WHIT">				</span><span class="NAME">this._mappingsNumByKey</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">key</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">--</span><span class="NAME">mappingsNum</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>672</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>673</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>674</span> 
<span class='line'>675</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>676</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>677</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>678</span> 
<span class='line'>679</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>680</span> 	 * maps &lt;code>handler&lt;/code> as a listener for &lt;code>eventType&lt;/code> to be called as a member of a &lt;code>clazz&lt;/code>
<span class='line'>681</span> 	 * instance. The instance will ALWAYS be a new one, regardless of previous injector mappings for that &lt;code>clazz&lt;/code>.&lt;br/>
<span class='line'>682</span> 	 * If &lt;code>handler&lt;/code> is &lt;code>undefined&lt;/code> or &lt;code>null&lt;/code> the instance will be created but no handler will be invoked.&lt;br/>
<span class='line'>683</span> 	 * In that case the dispatched payload will not be passed. (no constructor injection at the moment)
<span class='line'>684</span> 	 * @param {String} eventType
<span class='line'>685</span> 	 * @param {Class} clazz
<span class='line'>686</span> 	 * @param {Function} [handler=null]
<span class='line'>687</span> 	 * @param {Boolean} [oneShot=false]
<span class='line'>688</span> 	 * @param {Boolean} [passEvent=false]
<span class='line'>689</span> 	 */</span><span class="WHIT">
<span class='line'>690</span> </span><span class="WHIT">	</span><span class="NAME">addClassMapping</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">eventType</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">clazz</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">handler</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">oneShot</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">passEvent</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>691</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="WHIT"> </span><span class="NAME">this.injector.hasMapping</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">clazz</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>692</span> </span><span class="WHIT">			</span><span class="NAME">this.injector.mapClass</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">clazz</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">clazz</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>693</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">handler</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>694</span> </span><span class="WHIT">			</span><span class="NAME">handler</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>695</span> </span><span class="WHIT">		</span><span class="NAME">this.addRuledMapping</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">eventType</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">clazz</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">handler</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">oneShot</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">passEvent</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>696</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>697</span> 
<span class='line'>698</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>699</span> 	 * Removes the mapping for &lt;code>clazz&lt;/code>
<span class='line'>700</span> 	 * @see dijon.EventMap#addClassMapping
<span class='line'>701</span> 	 * @param {String} eventType
<span class='line'>702</span> 	 * @param {Class} clazz
<span class='line'>703</span> 	 * @param {Function} [handler=null]
<span class='line'>704</span> 	 */</span><span class="WHIT">
<span class='line'>705</span> </span><span class="WHIT">	</span><span class="NAME">removeClassMapping</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">eventType</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">clazz</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">handler</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>706</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">handler</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>707</span> </span><span class="WHIT">			</span><span class="NAME">handler</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>708</span> </span><span class="WHIT">		</span><span class="NAME">this._removeRuledMappingAndUnmapFromInjectorIfNecessary</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">eventType</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">clazz</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">handler</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>709</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>710</span> 
<span class='line'>711</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>712</span> 	 * Checks whether a mapping exists. The combination of &lt;code>eventType, key, handler&lt;/code> must be identical
<span class='line'>713</span> 	 * to what was mapped for this to return true. If &lt;code>key&lt;/code> was mapped for &lt;code>eventType&lt;/code> &lt;strong>with&lt;/strong>
<span class='line'>714</span> 	 * a &lt;code>handler&lt;/code> then &lt;code>hasMapping&lt;/code> will return &lt;code>false&lt;/code> if only invoked with parameters
<span class='line'>715</span> 	 * &lt;code>eventType&lt;/code> and &lt;code>key&lt;/code>
<span class='line'>716</span> 	 * @param {String} eventType
<span class='line'>717</span> 	 * @param {Object} key
<span class='line'>718</span> 	 * @param {Function} [handler=null]
<span class='line'>719</span> 	 * @return {Boolean}
<span class='line'>720</span> 	 */</span><span class="WHIT">
<span class='line'>721</span> </span><span class="WHIT">	</span><span class="NAME">hasMapping</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">eventType</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">key</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">handler</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>722</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">handler</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>723</span> </span><span class="WHIT">			</span><span class="NAME">handler</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>724</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this._getMappingIndex</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this._mappingsByEventType</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">eventType</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">key</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">handler</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">>=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>725</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>726</span> 
<span class='line'>727</span> 
<span class='line'>728</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="COMM">//dijon.EventMap.prototype</span><span class="WHIT">
<span class='line'>729</span> 
<span class='line'>730</span> 
<span class='line'>731</span> </span><span class="WHIT">  </span><span class="COMM">//======================================//</span><span class="WHIT">
<span class='line'>732</span> </span><span class="WHIT"> </span><span class="COMM">// dijon.Actor</span><span class="WHIT">
<span class='line'>733</span> </span><span class="COMM">//======================================//</span><span class="WHIT">
<span class='line'>734</span> 
<span class='line'>735</span> </span><span class="COMM">/**
<span class='line'>736</span>  * Convenience class
<span class='line'>737</span>  * @class dijon.Actor
<span class='line'>738</span>  * @constructor
<span class='line'>739</span>  */</span><span class="WHIT">
<span class='line'>740</span> </span><span class="NAME">dijon.Actor</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>741</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>742</span> 	 * @type dijon.Injector
<span class='line'>743</span> 	 */</span><span class="WHIT">
<span class='line'>744</span> </span><span class="WHIT">	</span><span class="NAME">this.injector</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">;</span><span class="COMM">//inject</span><span class="WHIT">
<span class='line'>745</span> </span><span class="WHIT">	
<span class='line'>746</span> 	</span><span class="COMM">/**
<span class='line'>747</span> 	 * @type dijon.EventMap
<span class='line'>748</span> 	 */</span><span class="WHIT">
<span class='line'>749</span> </span><span class="WHIT">	</span><span class="NAME">this.eventMap</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">;</span><span class="COMM">//inject</span><span class="WHIT">
<span class='line'>750</span> 
<span class='line'>751</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>752</span> 	 * @type dijon.EventDispatcher
<span class='line'>753</span> 	 */</span><span class="WHIT">
<span class='line'>754</span> </span><span class="WHIT">	</span><span class="NAME">this.eventDispatcher</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">//inject</span><span class="WHIT">
<span class='line'>755</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="COMM">//dijon.Actor</span><span class="WHIT">
<span class='line'>756</span> 
<span class='line'>757</span> </span><span class="NAME">dijon.Actor.prototype</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>758</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>759</span> 	 * is automatically invoked after injection has occurred.
<span class='line'>760</span> 	 * &lt;br/> cfr. RobotLegs' &lt;code>[PostConstruct]&lt;/code> or &lt;code>Mediator#onRegister&lt;/code>
<span class='line'>761</span> 	 */</span><span class="WHIT">
<span class='line'>762</span> </span><span class="WHIT">	</span><span class="NAME">setup</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>763</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>764</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="COMM">//dijon.Actor.prototype</span><span class="WHIT">
<span class='line'>765</span> 
<span class='line'>766</span> 
<span class='line'>767</span> </span><span class="WHIT">  </span><span class="COMM">//======================================//</span><span class="WHIT">
<span class='line'>768</span> </span><span class="WHIT"> </span><span class="COMM">// dijon.Context</span><span class="WHIT">
<span class='line'>769</span> </span><span class="COMM">//======================================//</span><span class="WHIT">
<span class='line'>770</span> 
<span class='line'>771</span> </span><span class="COMM">/**
<span class='line'>772</span>  * @class dijon.Context
<span class='line'>773</span>  * @constructor
<span class='line'>774</span>  */</span><span class="WHIT">
<span class='line'>775</span> </span><span class="NAME">dijon.Context</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>776</span> </span><span class="WHIT">	</span><span class="NAME">this.fqn</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'dijon.Context'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>777</span> 
<span class='line'>778</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="COMM">//dijon.Context</span><span class="WHIT">
<span class='line'>779</span> </span><span class="NAME">dijon.Context.prototype</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">dijon.Actor</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>780</span> </span><span class="NAME">dijon.Context.prototype.constructor</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">dijon.Context</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>781</span> 
<span class='line'>782</span> </span><span class="COMM">/**
<span class='line'>783</span>  * @private
<span class='line'>784</span>  */</span><span class="WHIT">
<span class='line'>785</span> </span><span class="NAME">dijon.Context.prototype._createInjector</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>786</span> </span><span class="WHIT">	</span><span class="NAME">this.injector</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">dijon.Injector</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>787</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>788</span> 
<span class='line'>789</span> </span><span class="COMM">/**
<span class='line'>790</span>  * @private
<span class='line'>791</span>  */</span><span class="WHIT">
<span class='line'>792</span> </span><span class="NAME">dijon.Context.prototype._setupWirings</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>793</span> </span><span class="WHIT">	</span><span class="NAME">this.parseConfig</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">dijon.wirings</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>794</span> </span><span class="WHIT">	</span><span class="NAME">this.injector.setValue</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">dijon.wirings.injector</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.injector</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>795</span> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>796</span> </span><span class="COMM">/**
<span class='line'>797</span>  * @param {Boolean} [autoStartup=true]
<span class='line'>798</span>  */</span><span class="WHIT">
<span class='line'>799</span> </span><span class="NAME">dijon.Context.prototype.init</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">autoStartup</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>800</span> </span><span class="WHIT">	</span><span class="NAME">this._createInjector</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>801</span> </span><span class="WHIT">	</span><span class="NAME">this._setupWirings</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>802</span> </span><span class="WHIT">	</span><span class="NAME">this.injector.injectInto</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>803</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">autoStartup</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">autoStartup</span><span class="PUNC">==</span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.startup</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>804</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>805</span> 
<span class='line'>806</span> </span><span class="NAME">dijon.Context.prototype.parseConfig</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">configList</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>807</span> </span><span class="WHIT">	</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">configName</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">configList</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>808</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">configObj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">configList</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">configName</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>809</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">configObj.singleton</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>810</span> </span><span class="WHIT">			</span><span class="NAME">this.injector.mapSingletonOf</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">configObj</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">configObj.impl</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>811</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>812</span> </span><span class="WHIT">			</span><span class="NAME">this.injector.mapClass</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">configObj</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">configObj.impl</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>813</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>814</span> </span><span class="WHIT">		</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">outletName</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">configObj.outlets</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>815</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">outletWiring</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">configObj.outlets</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">outletName</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>816</span> </span><span class="WHIT">			</span><span class="NAME">this.injector.addOutlet</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">configObj.impl</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">outletName</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">outletWiring</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>817</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>818</span> </span><span class="WHIT">		</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">configObj.handlers</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>819</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">handlerConfig</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">configObj.handlers</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>820</span> </span><span class="WHIT">			</span><span class="NAME">this.eventMap.addRuledMapping</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">handlerConfig.event</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">configObj</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">handlerConfig.handler</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">handlerConfig.oneShot</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">handlerConfig.passEvent</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>821</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>822</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>823</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>824</span> 
<span class='line'>825</span> 
<span class='line'>826</span> 
<span class='line'>827</span> </span><span class="COMM">/**
<span class='line'>828</span>  * abstract, should be overridden
<span class='line'>829</span>  */</span><span class="WHIT">
<span class='line'>830</span> </span><span class="NAME">dijon.Context.prototype.startup</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>831</span> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>832</span> 
<span class='line'>833</span> </span><span class="NAME">dijon.wirings</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>834</span> </span><span class="NAME">dijon.wirings.injector</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>835</span> </span><span class="WHIT">	</span><span class="NAME">impl</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">dijon.Injector</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>836</span> </span><span class="WHIT">	</span><span class="NAME">singleton</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="WHIT">
<span class='line'>837</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>838</span> </span><span class="NAME">dijon.wirings.eventDispatcher</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>839</span> </span><span class="WHIT">	</span><span class="NAME">impl</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">dijon.EventDispatcher</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>840</span> </span><span class="WHIT">	</span><span class="NAME">singleton</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="WHIT">
<span class='line'>841</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>842</span> </span><span class="NAME">dijon.wirings.eventMap</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>843</span> </span><span class="WHIT">	</span><span class="NAME">impl</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">dijon.EventMap</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>844</span> </span><span class="WHIT">	</span><span class="NAME">singleton</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>845</span> </span><span class="WHIT">	</span><span class="NAME">outlets</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>846</span> </span><span class="WHIT">		</span><span class="NAME">eventDispatcher</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">dijon.wirings.eventDispatcher</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>847</span> </span><span class="WHIT">		</span><span class="NAME">injector</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">dijon.wirings.injector</span><span class="WHIT">
<span class='line'>848</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>849</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>850</span> </span><span class="NAME">dijon.wirings.actor</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>851</span> </span><span class="WHIT">	</span><span class="NAME">impl</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">dijon.Actor</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>852</span> </span><span class="WHIT">	</span><span class="NAME">singleton</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>853</span> </span><span class="WHIT">	</span><span class="NAME">outlets</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>854</span> </span><span class="WHIT">		</span><span class="NAME">eventDispatcher</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">dijon.wirings.eventDispatcher</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>855</span> </span><span class="WHIT">		</span><span class="NAME">injector</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">dijon.wirings.injector</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>856</span> </span><span class="WHIT">		</span><span class="NAME">eventMap</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">dijon.wirings.eventMap</span><span class="WHIT">
<span class='line'>857</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>858</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>859</span> </span></pre></body></html>